import request from '@/utils/request'

export function listProject(query) {
    return request({
        url: '/handle/list',
        method: "get",
        params: query
    })
}
export function listExperimentDetails(query) {
    return request({
        url: '/handle/experimentDetails',
        method: "get",
        params: query
    })
}
export function listPost(query) {
    return request({
        url: '/handle/list/post',
        method: "get",
        params: query
    })
}

export function confirmPost(id) {
    return request({
        url: '/handle/post/confirm?id='+id,
        method: "get",
        params: id
    })
}
export function confirmPosts(ids){
    return request({
        url:'/handle/post/confirms',
        method:'post',
        data:ids,
    })
}

export function updateExperiment(data){
    return request({
        url:'/handle/experiment/update',
        method:'post',
        data:data
    })
}

export function backPost(id) {
    return request({
        url: '/handle/post/back?id='+id,
        method: "get",
        params: id
    })
}
export function backPosts(ids){
    return request({
        url:'handle/post/backs',
        method:"post",
        data:ids,
    })
}
export function listExperiment(query) {
    return request({
        url: '/handle/list/experiment',
        method: "get",
        params: query
    })
}

export function confirmExperiment(id) {
    return request({
        url: '/handle/experiment/confirm?id='+id,
        method: "get"
    })
}
export function confirmExperiments(ids){
    return request(({
        url:'/handle/experiment/confirms',
        method:'post',
        data:ids,
    }))
}
export function backExperiment(id) {
    return request({
        url: '/handle/experiment/back?id='+id,
        method: "get"
    })
}
export function backExperiments(ids){
    return request({
        url:'/handle/experiment/backs',
        method:'post',
        data:ids,
    })
}
export function toFinish(id){
    return request({
        url:'/handle/finish?id='+id,
        method:'get'
    })
}
